package com.example.myproject.service;

import com.example.myproject.entity.UserEntity;
import org.springframework.stereotype.Service;

import java.util.List;

public interface UserService {
    /**
     * 查询
     */
    List<UserEntity> findAll();

    UserEntity findOneById(Long id);

    UserEntity findOneByCardNo(String cardNo);

    /**
     * 增加
     */
    void save(UserEntity user);

    void saveAll(List<UserEntity> userEntityList);

    /**
     * 删
     */
    void deleteById(Long id);

    void deleteByCardNo(String cardNo);

    void delete(UserEntity user);

    void deleteAll();

    /**
     * 修改或更新
     */
    void update(UserEntity user);
    // 不为空的字段更新，为空的字段保留原来的值
    void updateNoNull(UserEntity user);

    void updateAll(List<UserEntity> userEntityList);


}
